from rest_framework import serializers

from car.models import Car, CarInfo, CarsComment
from user.serializers import UserSerializer


class CarSerializer(serializers.ModelSerializer):
    class Meta:
        model = Car
        fields = '__all__'

class CarInfoSerializer(serializers.ModelSerializer):
    class Meta:
        model = CarInfo
        fields = '__all__'

class CommentSerializer(serializers.ModelSerializer):
    user = UserSerializer()
    class Meta:
        model = CarsComment
        fields = '__all__'